package com.hfc.test.dubbo.controller;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.hfc.test.dubbo.service.SayHelloService;

@Controller
public class ConsumerController {

	@Resource(name = "sayHelloImplConsumer")
	private SayHelloService sayHelloService;
	
	@RequestMapping("/consumer")
	@ResponseBody
	public void sayHello() {
		System.out.println("consumer say hello!");
		sayHelloService.sayHello();
	}
}
